Integrand size = 31, antiderivative size = 156 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=-\frac {(4 A-7 B) \text {arctanh}(\sin (c+d x))}{2 a^2 d}+\frac {2 (5 A-8 B) \tan (c+d x)}{3 a^2 d}-\frac {(4 A-7 B) \sec (c+d x) \tan (c+d x)}{2 a^2 d}+\frac {(5 A-8 B) \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2} \]
[Out]
Time = 0.38 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4104, 3872, 3852, 8, 3853, 3855} \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=-\frac {(4 A-7 B) \text {arctanh}(\sin (c+d x))}{2 a^2 d}+\frac {2 (5 A-8 B) \tan (c+d x)}{3 a^2 d}+\frac {(5 A-8 B) \tan (c+d x) \sec ^2(c+d x)}{3 a^2 d (\sec (c+d x)+1)}-\frac {(4 A-7 B) \tan (c+d x) \sec (c+d x)}{2 a^2 d}+\frac {(A-B) \tan (c+d x) \sec ^3(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3853
Rule 3855
Rule 3872
Rule 4104
Rubi steps \begin{align*} \text {integral}& = \frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {\int \frac {\sec ^3(c+d x) (3 a (A-B)-a (2 A-5 B) \sec (c+d x))}{a+a \sec (c+d x)} \, dx}{3 a^2} \\ & = \frac {(5 A-8 B) \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {\int \sec ^2(c+d x) \left (2 a^2 (5 A-8 B)-3 a^2 (4 A-7 B) \sec (c+d x)\right ) \, dx}{3 a^4} \\ & = \frac {(5 A-8 B) \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {(2 (5 A-8 B)) \int \sec ^2(c+d x) \, dx}{3 a^2}-\frac {(4 A-7 B) \int \sec ^3(c+d x) \, dx}{a^2} \\ & = -\frac {(4 A-7 B) \sec (c+d x) \tan (c+d x)}{2 a^2 d}+\frac {(5 A-8 B) \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {(4 A-7 B) \int \sec (c+d x) \, dx}{2 a^2}-\frac {(2 (5 A-8 B)) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 a^2 d} \\ & = -\frac {(4 A-7 B) \text {arctanh}(\sin (c+d x))}{2 a^2 d}+\frac {2 (5 A-8 B) \tan (c+d x)}{3 a^2 d}-\frac {(4 A-7 B) \sec (c+d x) \tan (c+d x)}{2 a^2 d}+\frac {(5 A-8 B) \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2} \\ \end{align*}
Time = 1.50 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.83 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\sec ^2(c+d x) \left (-24 (4 A-7 B) \text {arctanh}(\sin (c+d x)) \cos ^4\left (\frac {1}{2} (c+d x)\right )+(28 A-37 B+6 (7 A-10 B) \cos (c+d x)+(28 A-43 B) \cos (2 (c+d x))+10 A \cos (3 (c+d x))-16 B \cos (3 (c+d x))) \sec (c+d x) \tan (c+d x)\right )}{12 a^2 d (1+\sec (c+d x))^2} \]
[In]
[Out]
Time = 0.93 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.03
method | result | size |
parallelrisch | \(\frac {4 \left (A -\frac {7 B}{4}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-4 \left (A -\frac {7 B}{4}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+7 \left (\frac {\left (2 A -\frac {43 B}{14}\right ) \cos \left (2 d x +2 c \right )}{3}+\frac {\left (5 A -8 B \right ) \cos \left (3 d x +3 c \right )}{21}+\left (A -\frac {10 B}{7}\right ) \cos \left (d x +c \right )+\frac {2 A}{3}-\frac {37 B}{42}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d \,a^{2} \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(160\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {2 A -5 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (4 A -7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {2 A -5 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (7 B -4 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}{2 d \,a^{2}}\) | \(177\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B -\frac {2 A -5 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (4 A -7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {2 A -5 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (7 B -4 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}}{2 d \,a^{2}}\) | \(177\) |
norman | \(\frac {\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{6 a d}+\frac {\left (9 A -13 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {\left (11 A -18 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}+\frac {\left (11 A -17 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{6 a d}+\frac {\left (61 A -100 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 a d}-\frac {\left (95 A -149 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} a}+\frac {\left (4 A -7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{2} d}-\frac {\left (4 A -7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{2} d}\) | \(228\) |
risch | \(\frac {i \left (12 A \,{\mathrm e}^{6 i \left (d x +c \right )}-21 B \,{\mathrm e}^{6 i \left (d x +c \right )}+36 A \,{\mathrm e}^{5 i \left (d x +c \right )}-63 B \,{\mathrm e}^{5 i \left (d x +c \right )}+56 A \,{\mathrm e}^{4 i \left (d x +c \right )}-98 B \,{\mathrm e}^{4 i \left (d x +c \right )}+84 A \,{\mathrm e}^{3 i \left (d x +c \right )}-126 B \,{\mathrm e}^{3 i \left (d x +c \right )}+64 A \,{\mathrm e}^{2 i \left (d x +c \right )}-97 B \,{\mathrm e}^{2 i \left (d x +c \right )}+48 \,{\mathrm e}^{i \left (d x +c \right )} A -75 B \,{\mathrm e}^{i \left (d x +c \right )}+20 A -32 B \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{a^{2} d}-\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{2 a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{a^{2} d}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 a^{2} d}\) | \(276\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.46 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=-\frac {3 \, {\left ({\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (4 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (4 \, {\left (5 \, A - 8 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (28 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (A - B\right )} \cos \left (d x + c\right ) + 3 \, B\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {A \sec ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{5}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 336 vs. \(2 (146) = 292\).
Time = 0.22 (sec) , antiderivative size = 336, normalized size of antiderivative = 2.15 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=-\frac {B {\left (\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} - \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )} - A {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.27 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=-\frac {\frac {3 \, {\left (4 \, A - 7 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {3 \, {\left (4 \, A - 7 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {6 \, {\left (2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{2}} - \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 21 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
[In]
[Out]
Time = 13.60 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.06 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A-B\right )}{2\,a^2}+\frac {2\,A-4\,B}{2\,a^2}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,A-5\,B\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A-3\,B\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A-B\right )}{6\,a^2\,d}-\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (4\,A-7\,B\right )}{a^2\,d} \]
[In]
[Out]